﻿using System;

class PrintCirclePerimeterAndArea
{
    static void Main()
    {
        string parseRadius;
        double radius, perimeter, area;
        bool checker;

        Console.WriteLine("This program prints perimeter and area of a circle by given radius (r)");
        do
        {
            Console.Write("Enter radius: ");
            parseRadius = Console.ReadLine();
            checker = double.TryParse(parseRadius, out radius);
            
            if (checker == false)
            {
                Console.WriteLine("Not a number. Try again!");
            }

        } while(checker == false);
        
        perimeter = 2 * Math.PI * radius;
        area = Math.PI * (radius * radius);
        Console.WriteLine("Perimeter = {0::0.0000}", perimeter);
        Console.WriteLine("Area = {0:0.0000}", area);
    }
}
